import React from 'react'
import Stick, {RXTheme, RXRoot} from 'react-native-test-rxstick'

export default class TestStick extends Stick {
  constructor(props) {
    //调用实现父类的构造函数
    super(props)
  }

  static allowAccess() {
    return true
  }

  static setTheme() {
    if (__DEV__) {
      const TestTheme = require('./theme/index').default
      RXTheme.update(TestTheme)
    }
  }

  static setRoot() {
    if (__DEV__) {
      const TestNav = require('./navigation/index').default
      RXRoot.replaceComponent(<TestNav />)
    }
  }
}
